<ion-view view-title="{{language == 0?'我的门票':'My Tickets'}}">
  <ion-content class="normal_box bg" delegate-handle="mainScroll" overflow-scroll="false">
    <div class="top_header">
      <span class="header_left" ng-click="backhome()">
        <img src="img/backhome.png" class="backhome" />
      </span>
      <i class="iconfont icon-Path5 top_icon2" ng-click="gotoCenter()"></i>
      <!-- <i class="iconfont icon-Path11 top_icon3" ng-click="gotoShop()"></i> -->
    </div>

    <!-- 有门票记录 -->
    <div class="ticket_pro" ng-repeat="list in orders" ng-if="orders">
      <p class="ticket_line" ng-click="show1(list)">
        <span class="ticket_leftspan" ng-class="{'f12_i':language == 1}">{{language==0?'订单编号:':'Order No.'}}</span>
        <span class="ticket_rightspan" ng-class="{'f12_i':language == 1}" ng-if="list.is_use == 0&&list.status!='4'">{{language==0?'未使用':'Redeemable'}}</span>
        <span class="ticket_rightspan" ng-class="{'f12_i':language == 1}" ng-if="list.is_use==1&&list.status!='4'">{{language==0?'已使用':'Redeemed'}}</span>
        <span class="ticket_rightspan" ng-class="{'f12_i':language == 1}" ng-if="list.status=='4'">{{language==0?'已取消':'Canceled'}}</span>
        {{list.order_num}}
      </p>

      <p class="ticket_line mt7">
        <span class="ticket_leftspan" ng-class="{'f12_i':language == 1}">{{language==0?'下单时间:':'Order Time:'}}</span>
        {{list.create_time*1000|date:'yyyy.MM.dd HH:mm'}}
      </p>

      <div class="ticket_box">
        <img class="ticket_box_img" src="{{fullPath(list.exhibition_cover_path)}}"/>
        <p class="ticket_line2 span_line2">{{language==0?list.exhibition_name:list.exhibition_name_en}}</p>
        <span class="ticket_type">{{language==0?list.ticket_name:list.ticket_name_en}}</span>
        <span class="ticket_price"><i>￥</i>{{list.total_price/list.amount}}</span>

        <span class="ticket_num"><i>X</i>{{list.amount}}</span>
      </div>

      <div class="ticket_footer">
        {{language==0?'合计':'Total'}}  ￥{{list.total_price}}
        <span class="ticket_pay" ng-if="list.status == 0">去支付</span>
        <!-- <span class="ticket_pay_order" ng-if="list.status == 1" ng-click="show1(list)">{{language==0?'订单码':'Order Codes'}}</span> -->
        <span class="ticket_pay" ng-if="list.status == 1" ng-click="show(list)">{{language==0?'兑换码':'Redeem Codes'}}</span>
        <span class="ticket_pay cancel_order" ng-if="list.status == 1&&list.total_price==0&&list.exhibition_type==0" ng-click="cancelOrder(list)">{{language==0?'取消订单':'Cancel'}}</span>
        <span class="ticket_pay cancel_order" ng-if="list.status == 1&&list.total_price==0&&list.exhibition_type!=0" ng-click="cancelOrder(list)">{{language==0?'取消预约':'Cancel'}}</span>
      </div>
    </div>

  </ion-content>

  <!-- 兑换框 -->
  <div class="mubu" ng-if="show_box == 1">

    <div class="normal_box pd5_20_18 duihuan">
      <div class="ticket_content pos_re swiperbox{{order.id}}">
        <div class="swiper-container">
          <div class="swiper-wrapper" ng-if="mubu_mark == 1">
          
            <div class="swiper-slide" ng-show="codes" ng-repeat="list in codes">
              <p class="ticket_cline1">{{language==0?'请向工作人员出示条码，检票入场':'Please show your ticket redeem code(s) when you enter the space'}}</p>
              <p class="ticket_cline2"><span>{{language==0?order.exhibition_name:order.exhibition_name_en}}</span></p>
              <p class="ticket_cline2">{{language==0?'票种:':'Ticket'}}<span>&nbsp;&nbsp;{{language==0?order.ticket_name:order.ticket_name}}</span></p>
              <p class="ticket_cline2">{{language==0?'订单编号:':'Order No.'}}<span>&nbsp;&nbsp;{{order.order_num}}</span></p>

              <div class="ticket_dashline"></div>
              
              <div class="two_mark_box">
                <div class="two_mark pos_re">
                  <img id="barcode{{list.id}}" class="qrimg"/>
                  <div class="mengban_qrcode" ng-if="list.status == 1"></div>
                </div>
              </div>

              <p class="ticket_cline3" ng-if="list.status == 1&&language == 0">已于{{list.redeem_time*1000|date:'yyyy.MM.dd HH:mm'}}兑换</p>
              <p class="ticket_cline3" ng-if="list.status == 1&&language == 1">Redeemed on {{list.redeem_time*1000|date:'yyyy.MM.dd HH:mm'}}</p>
              <!-- <p class="ticket_cline3" ng-if="list.status == 0"></p> -->
              <p class="ticket_cline4" ng-if="language == 0">兑换码: {{list.redeem_code}}</p>
              <p class="ticket_cline4" ng-if="language == 1">Redeem Code: {{list.redeem_code}}</p>
            </div>  
            
          </div>

          <div class="swiper-wrapper" ng-if="mubu_mark == 2">
          
            <div class="swiper-slide">
              <p class="ticket_cline1">{{language==0?'请向工作人员出示条码，检票入场':'Please show your ticket redeem code(s) when you enter the space'}}</p>
              <p class="ticket_cline2">{{language==0?'订单编号:':'Order No.'}}<span>&nbsp;&nbsp;{{order.order_num}}</span></p>

              <div class="ticket_dashline"></div>
              
              <div class="two_mark_box">
                <div class="two_mark pos_re">
                  <img id="barcode{{order.order_num}}" class="qrimg"/>
                </div>
              </div>

            </div>  
            
          </div>

        </div>
        <div class="swiper-pagination"></div>
      </div>

      <div class="ticket_cancle" ng-click="cancle_show()" ng-class="{'pfsc':language == 1}">{{language==0?'关闭':'Close'}}</div>
    </div>

  </div>

  <!-- 无门票 -->
  <div class="noinfo_span" ng-if="!orders">
    暂无订单
  </div>

</ion-view>